package com.dog.basics.api.controller.mtkj;


import com.dog.basics.bean.vo.api.mtkj.ApiLockVo;
import com.dog.basics.common.constant.SwaggerConstants;
import com.dog.basics.common.util.R;
import com.dog.basics.service.mtkj.IMtDeviceLockService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

/**
 * <p>
 * 设备锁 前端控制器
 * </p>
 *
 * @author wph
 * @since 2020-09-29
 */
@RestController
@RequestMapping("/api/device/lock")
@Api(value = "设备锁模块", tags = SwaggerConstants.API_ALL)
@AllArgsConstructor
@ApiIgnore
public class MtDeviceLockController {
    private final IMtDeviceLockService mtDeviceLockService;

    /**
     * @Description: 设备锁详情
     * @Param: id
     * @return: ApiLockVo
     * @Author: wph
     * @Date:
     */
    @ApiOperation(value = "设备锁详情", notes = "设备锁详情", tags = SwaggerConstants.API_SAO)
    @ApiImplicitParam(value = "设备锁ID", name = "id", dataType = "Long", required = true)
    @GetMapping("/getApiObjXq/{id}")
    @ApiIgnore
    public R<ApiLockVo> getApiObjXq(@PathVariable("id") Long id) {
        return R.ok(mtDeviceLockService.getApiObjXq(id));
    }
}
